<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-text指令</title>
  </head>
  <body>
    <div id="root">
      <!-- v-text:
            1.向其所在的节点中渲染文本内容
            2.v-text会替换节点中的内容，{{xxx}}不会 -->
      <h2 v-text="message + '!' ">姓名</h2>
      <h2>姓名：{{ message }}</h2>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
      var vm = new Vue({
        el: "#root",
        data: {
          message: "mannoname",
        },
      });
    </script>
  </body>
</html>
